Fitting, counting, and figuring out where all the cubes belong.
